from base_page import BasePage
from selenium.webdriver.common.by import By


class BaiduNewsPage(BasePage):
    url = "http://news.baidu.com/"
    __inputNews = (By.CSS_SELECTOR,"#ww")
    __searchBth = (By.CSS_SELECTOR,"#s_btn_wr")


    def open_page(self):
        self.driver.get(self.url)

    def input_searchNews(self,news):
        self.find_element(*self.__inputNews).send_keys(news)

    def click_searchBth(self):
        self.find_element(*self.__searchBth).click()
